/*
 * This file is part of the Pazzk project <https://pazzk.net/>.
 * Copyright (c) 2024 Pazzk <team@pazzk.net>.
 *
 * Community Version License (GPLv3):
 * This software is open-source and licensed under the GNU General Public
 * License v3.0 (GPLv3). You are free to use, modify, and distribute this code
 * under the terms of the GPLv3. For more details, see
 * <https://www.gnu.org/licenses/gpl-3.0.en.html>.
 * Note: If you modify and distribute this software, you must make your
 * modifications publicly available under the same license (GPLv3), including
 * the source code.
 *
 * Commercial Version License:
 * For commercial use, including redistribution or integration into proprietary
 * systems, you must obtain a commercial license. This license includes
 * additional benefits such as dedicated support and feature customization.
 * Contact us for more details.
 *
 * Contact Information:
 * Maintainer: 권경환 Kyunghwan Kwon (on behalf of the Pazzk Team)
 * Email: k@pazzk.net
 * Website: <https://pazzk.net/>
 *
 * Disclaimer:
 * This software is provided "as-is", without any express or implied warranty,
 * including, but not limited to, the implied warranties of merchantability or
 * fitness for a particular purpose. In no event shall the authors or
 * maintainers be held liable for any damages, whether direct, indirect,
 * incidental, special, or consequential, arising from the use of this software.
 */

#ifndef CHARGER_FACTORY_H
#define CHARGER_FACTORY_H

#if defined(__cplusplus)
extern "C" {
#endif

#include "charger/charger.h"
#include "charger/connector.h"

/**
 * @brief Creates a charger instance based on the provided parameters.
 *
 * @param[out] param Pointer to the charger parameters.
 * @param[out] extension Pointer to the charger extension.
 * @param[in] ctx The context for the charger, used to abstract parameters for
 *            each charger.
 *
 * @return Pointer to the created charger instance.
 */
struct charger *charger_factory_create(struct charger_param *param,
		struct charger_extension **extension, void *ctx);

/**
 * @brief Creates a connector instance based on the provided parameters.
 *
 * @param[in] param Pointer to the connector parameters.
 *
 * @return Pointer to the created connector instance.
 */
struct connector *connector_factory_create(const struct connector_param *param);

/**
 * @brief Retrieves the current mode of the charger factory.
 *
 * @return String representing the current mode of the charger factory.
 */
const char *charger_factory_mode(void);

#if defined(__cplusplus)
}
#endif

#endif /* CHARGER_FACTORY_H */
